{% extends "learning_logs/base.html" %}

{% block header %}
	<h2>{{ topic }}</h2>

{% block content %}
<p>Topic {{ topic }}</p>
<p>Entries:</p>
<p>
	<a href="{% url 'learning_logs:new_entry' topic.id %}">添加新条目</a>
</p>
<ul>
	{% for entry in entries %}
	<li>
		<p>{{ entry.date_added|date:'M d, Y H:i' }}</p>
		<p>{{ entry.text|linebreaks }}</p>
		<p>
			<a href="{% url 'learning_logs:edit_entry' entry.id %}">编辑条目</a>
		</p>
	{% empty %}
	<li>没有创建任何条目</li>
	</li>
	{% endfor %}
</ul>

{% endblock content %}